<template>
  <div class="bottom-bar">
    <div class="ticket-order" @click="changePageTicket">
      <i :class="leftIcon"></i>
      <span class="text" v-text="leftTitle"></span>
    </div>
    <div class="self-service" @click="changePageSelf">
      <i :class="rightIcon"></i>
      <span class="text" v-text="rightTitle"></span>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'v-flight-bar',
    props: {
      leftTitle: {
        type: String,
        default: ''
      },
      rightTitle:{
        type: String,
        default: ''
      },
      leftIcon: {
        type: String,
        default: ''
      },
      rightIcon:{
        type: String,
        default: ''
      }
    },
    methods: {
      changePageTicket: function (e) {
        this.$emit('clickLeftBtn', e)
      },
      changePageSelf: function (e) {
        this.$emit('clickRightBtn', e)
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .bottom-bar {
    position: fixed;
    z-index: 99;
    bottom: 0;
    display: flex;
    width: 100%;
    height: 3rem;
    line-height: 3rem;
    justify-content: center;
    color: #666;
    background-color: #fff;
    & > div {
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 1;
      text-align: center;
    }
    &>div:first-child {
      position: relative;
      height: 3rem;
      line-height: 3rem;
    }
    &>div:first-child::after {
      position: absolute;
      content: '';
      top: 50%;
      right: 0;
      transform: translateY(-50%);
      width: 1px;
      height: 60%;
      background-color: #eee;
    }
    & i {
      margin-right: .25rem;
      font-size: 1.7rem;
      color: #46a1bb;
    }
    & .text {
      font-size: .8rem;
      color: #666;
    }
  }

</style>
